const order = require('w-order-js')

const process = (next, s) => {
    
    setTimeout(() => {
        console.log('msg_' + s)
        
        next(s+1)
    }, 1000)
}
const or = new order(1)

or.then(process)
.then(process)
.then(process)
.then(process)
.end(()=>{
    console.log('end');
})
.catch((err)=>{
    console.log(err.message);
})
